import React, { Component } from 'react'
import { Provider } from 'react-redux'

import {configureStore} from './store'
// import pool from "./utils/router/util/pool";
import {Navigator} from  "@/utils/navigator";

import './app.css'

const store = configureStore()

class App extends Component {
  componentDidMount () {
    // const map = new Map<string, any>();
    // map.set('user', {username: "alvin.xin", agent: false})
    // pool.cache.data.set('user', {username: "alvin"})
    Navigator.config({
      middlewares: [],
      cacheKey: "_monument_page_"
    })
  }

  componentDidShow () {}

  componentDidHide () {}

  componentDidCatchError () {}

  // 在 App 类中的 render() 函数没有实际作用
  // 请勿修改此函数
  render () {
    // console.log("store: ", store.getState())

    return (
      <Provider store={store}>
        {this.props.children}
      </Provider>
    )
  }
}

export default App
